$(function () {
   // var prefix = "http://10.10.10.72:8080";
    var add_UserName;
    var add_UserKey;
    var addData1;
    var addData;
    $(".sign_Btn").click(function () {
        add_UserName =  $(".add_UserName").val();
        add_UserKey = $(".add_UserKey").val();
        addData1 = {userName:add_UserName,password:add_UserKey};
        addData = JSON.stringify(addData1)
        if(add_UserName == ""){
            alert("用户名不能为空")
        }else if(add_UserKey == ""){
            alert("密码不能为空")
        }else{
        $.ajax({
            type: "post",
            url:  "/managesystem/user/addUser",
            data: addData,
            contentType: "application/json;charset=utf-8", //这个是发送信息至服务器时内容编码类型
            dataType:"json",
            success:function (data) {
                console.log(JSON.stringify(data));
                if(data.statue == true){
                    window.location.href= "sign-in.html"
                }else{
                    alert(data.msg)
                }

            }
        })
        }
    })

});